// foreach in collection 


package ForEach;

import java.util.ArrayList;

public class ForEachList {
public static void main(String[] args) {
	//an arraylist of string 
ArrayList <String> list = new ArrayList<String>();
//adding the value 
list.add("first");
list.add("second");
list.add("third");
list.add("fourth");
list.add("fifth");

// itrating every element one by one  from arraylist using foreach loop
for(String s : list){
	System.out.println(s);
}

}

}
